package com.ibatis4J.framework.dal.exception;

/**
 * 异常类
 * 
 * @author liuwenya
 *
 */
public class DalException extends RuntimeException{

	/**
	 * serialVersionUID
	 */
	private static final long serialVersionUID = 5538016635722110458L;
	
	private String code;
	
	private String msg;
	
	private Throwable throwable;
	
	/**
	 * 构造方法
	 */
	public DalException(){
		
	}
	
	/**
	 * 构造方法
	 * 
	 * @param msg 异常信息
	 */
	public DalException(String msg){
		super(msg);
		this.msg=msg;
	}
	
	/**
	 * 构造方法
	 * 
	 * @param throwable 异常原因
	 */
	public DalException(Throwable throwable){
		super(throwable);
		this.throwable=throwable;
	}
	
	/**
	 * 构造方法
	 * 
	 * @param msg  异常信息
	 * @param throwable 异常原因
	 */
	public DalException(String msg,Throwable throwable){
		super(msg, throwable);
		this.msg=msg;
		this.throwable=throwable;
	}
	
	public DalException(String code,String msg,Throwable throwable){
		super(msg, throwable);
		this.code=code;
		this.msg=msg;
		this.throwable=throwable;
	}
	
	public DalException(String code,String msg){
		super(msg);
		this.code=code;
		this.msg=msg;
	}
	
	

}
